package com.liuyi.usercenterservice.common;

/**
 * @author 刘燚
 * @version v1.0.0
 * @Description TODO 通用错误代码
 * @createDate：2024/3/26 23:11
 * @email liuyia2022@163.com
 */
public enum ErrorCode {
    /**
     * 前端参数错误
     */
    PARAMS_ERROR(40000,"前端参数错误",""),
    /**
     * 请求数据为控
     */
    NULL_ERROR(40001,"请求数据为控",""),
    /**
     * 未登录
     */
    NOT_LOGIN(40010,"未登录",""),
    /**
     * 未登录
     */
    NO_AUTH(40101,"无鉴权",""),
    /**
     * 无操作权限
     */
    NO_PERMISSION(40102,"无权限",""),
    /**
     * 系统错误
     */
    SYSTEM_ERROR(50000,"系统服务错误",""),
    /**
     * 数据错误
     */
    DATA_ERROR(60000,"数据错误",""),
    /**
     * 未查询到数据
     */
    NOT_EXIST_DATA(60001,"未查询到数据",""),
    /**
     * 数据已存在
     */
    EXIST_DATA(60002,"数据已存在","");

    private final int code;
    private final String message;
    private final String description;
    ErrorCode(int code, String message, String description) {
        this.code = code;
        this.message = message;
        this.description = description;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    public String getDescription() {
        return description;
    }
}
